const { dir } = require('console');
const fs = require('fs');
const path = require('path');
const dirname = path.resolve(__dirname, './myfiles/');
async function test() {
  // 读取一个目录 返回 里面 子文件名
  const pathes = await fs.promises.readdir(dirname);
  console.log(pathes);
}

// test();

async function read() {
  const pathes = await fs.promises.readdir(dirname);
  console.log(pathes, 'log');
}

read();
